
/*******************************************************************************
** CopyRight (c) 2005-2008 SKY-MOBI Ltd. All rights reserved.
** Filename:  appmgr_res.h
** Creator:   yuzhifeng
** Version:   0.0
** Date:      
** Description:
 *******************************************************************************/
#ifndef __APPMGR_RES_H__
#define __APPMGR_RES_H__

#include "mrc_base.h"
#include "res.h"
#include "appmgr.h"

#ifdef __cplusplus
extern "C" {
#endif  /* __cplusplus */

#if 0
typedef struct {
	uint32 resId;  // maybe we can use "int32 resId;"
	bmpSt smallIcon;
	bmpSt largeIcon;
} RES_ICON_T, *PRESICON;
#else
typedef struct {
	uint32 resId;  // maybe we can use "int32 resId;"
	int32 isSmall;
	uint8 isFirm;
	uint8 reserve1;
	uint16 reserve2;
	bmpSt icon;
} RES_ICON_T, *PRESICON;
#endif


#if defined(INCLUDE_IN_PLUG_APPMGR_SRC) || defined(SDK_NO_PLUGIN)
/**
 * \brief 
 *
 * \param 
 * \return 
 */

HBITMAP LoadJpegFromFile(const char* name, int16* w, int16* h);
bmpSt* APP_Res_LoadIcon(uint32 iconId, uint16 defIcon, int8 isSmall);
int32 APP_Res_Init(const char* path);
#else
#define APP_Res_LoadIcon(iconId, defIcon, isSmall) \
	(bmpSt*)mrc_extSendAppEventEx(MPS_CODE_APPMGR_SHELL, APPMGR_FUNC_RES_LOADICON, (int32)iconId, (int32)defIcon, (int32)isSmall, (int32)0, (int32)0)
#endif

#ifdef __cplusplus
}
#endif  /* __cplusplus */


#endif

